// function User(name) {
//   this.name = name;
// }
// function Admin(name) {
//   User.call(this, name);
// }
// // Admin.prototype = Object.create(User.prototype);
// let hd = new Admin("后盾人");
// console.log(hd.name);

class User {
  constructor(name) {
    this.name = name;
  }
  show() {
    console.log("hdcms.com");
  }
}
class Admin extends User {
  constructor(name) {
    //super代表父级
    super(name);
  }
  info() {
    super.show();
  }
}
let hd = new Admin("后盾人");
console.log(hd.name);
hd.show();
hd.info();
